#include <iostream>
#include <algorithm>
#include <cstring>

using namespace std;

int cnt[10];

int main()
{
	char s1[4], s2[4], s3[4];
	
	cin >> s1 >> s2 >> s3;
	
	if (s1[1] == '<') reverse(s1, s1 + 3);
	if (s2[1] == '<') reverse(s2, s2 + 3);
	if (s3[1] == '<') reverse(s3, s3 + 3);
	
	cnt[s1[0] - 'A'] ++ ;
	cnt[s2[0] - 'A'] ++ ;
	cnt[s3[0] - 'A'] ++ ;
	
//	cout << s1[0] << s2[0] << s3[0] << endl;
//	cout << cnt[0] << cnt[1] << cnt[2] << endl;
	
	if (cnt[1] == 1 && cnt[2] == 1 && cnt[0] == 1)
	{
		cout << "Impossible" << endl;
		return 0;
	}
	
	for (int i = 0, c = 0; i < 3; i ++ , c ++ )
	{
		for (int j = 0; j < 3; j ++ )
		{
//			cout << cnt[j] << "===" << c << endl;
			if (cnt[j] == c)
			{
				cout << (char)(j + 'A');
				break;
			}
		}
//		exit(0);
	}
	
	return 0;
}